package data;

import java.util.Vector;

public class InputFileRelay {
	private Vector<InputFileRecord> records;
	
	public InputFileRelay() {
		records = new Vector<InputFileRecord>();
	}
	
	public synchronized void addRecord(InputFileRecord record) {
		records.add(record);
	}
	
	public synchronized InputFileRecord getRecord() {
		if (!records.isEmpty()) {
			InputFileRecord record = records.firstElement();
			records.remove(record);
			return record;
		}
		return null;
	}
}
